package com.smcdd.cdb.dbo.cdb_dbo.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.smcdd.cdb.dbo.cdb_dbo.ui.base.BaseFragmentFragment;

import java.util.List;


/**
 * 作者：Administrator on 2017/5/24 15:47
 * 邮箱：zhanghuaiha@gmail.com
 * 海报模版 ViewPagerAdapter
 *
 */

public class ShopPagerAdapter extends FragmentPagerAdapter {

    private List<BaseFragmentFragment> mFragments;

    public ShopPagerAdapter(FragmentManager fm, List<BaseFragmentFragment> fragments) {
        super(fm);
        this.mFragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments != null ? mFragments.size() : 0;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return super.getPageTitle(position);
    }
}